<?php

use App\Http\Controllers\Web\Auth\ForgetPasswordController;
use App\Http\Controllers\Web\Auth\LoginController;
use App\Http\Controllers\Web\Auth\RegisterController;
use App\Http\Controllers\Web\Auth\SmsController;
use App\Http\Controllers\Web\IndexController;
use Illuminate\Support\Facades\Route;

Route::get('/', [IndexController::class, 'index'])->name('index');
Route::get('/help', [IndexController::class, 'help'])->name('help');
Route::get('/contact', [IndexController::class, 'contact'])->name('contact');
Route::get('/privacy', [IndexController::class, 'privacy'])->name('privacy');
// 条款
Route::get('/terms', [IndexController::class, 'terms'])->name('terms');

// 登录
Route::get('/login', [LoginController::class, 'index'])->name('login');
Route::post('/login/authenticate', [LoginController::class, 'authenticate'])->name('authenticate');

// 注册
Route::get('/register', [RegisterController::class, 'index'])->name('register');
Route::post('/register/authenticate', [RegisterController::class, 'authenticate'])->name('register.authenticate');

// 忘记密码
Route::get('/forget-password', [ForgetPasswordController::class, 'index'])->name('forget-password');
Route::post('/forget-password/authenticate', [ForgetPasswordController::class, 'authenticate'])->name('forget-password.authenticate');

// 短信验证码登录
Route::post('/auth/sms', [SmsController::class, 'send'])->name('auth.sms');

// 退出登录
Route::get('/logout', [LoginController::class, 'logout'])->name('logout');
